From: Keir Fraser Date: Thu, 27 Nov 2008 12:43:25 +0000 (+0000) Subject: Avoid warn_unused_result build failure on fgets(). X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~14040^2~19 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/success//%22http:/www.example.com/cgi/success/?a=commitdiff_plain;h=7f470fe5a914aed091ed845a3f6c32027f8d5d13;p=xen.git Avoid warn_unused_result build failure on fgets(). Signed-off-by: Keir Fraser --- diff --git a/xen/tools/symbols.c b/xen/tools/symbols.c index 76eb88b585..bf632d7aea 100644 --- a/xen/tools/symbols.c +++ b/xen/tools/symbols.c @@ -81,7 +81,8 @@ static int read_symbol(FILE *in, struct sym_entry *s) if (rc != 3) { if (rc != EOF) { /* skip line */ - fgets(str, 500, in); + if (fgets(str, 500, in) == NULL) + return -1; /* must check fgets result */ } return -1; }